import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import javax.swing.SwingConstants;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
@SuppressWarnings("serial")
public class GUIMachine extends JFrame {
	// Variables declaration - do not modify//GEN-BEGIN:variables
    private JLabel celsiusLabel;
    private JLabel fahrenheitLabel;
    private JTextField tempTextField;
    private JTextField imagePath;
    private JButton generateButton;
    private JTextField PlaceTextField;
    private JTextField dateTextField;
    private JLabel image;
    private JLabel place;
    private JLabel date;
    private JLabel textBox;
    private JTextArea textBlockTextArea;
    private JTextField subHeadTextField;
    private JLabel subHeadline;
    // End of variables declaration//GEN-END:variables
    
	public GUIMachine() {
		tempTextField = new JTextField();
        celsiusLabel = new JLabel();
        GroupLayout layout = new GroupLayout((JComponent)getContentPane());
        getContentPane().setLayout(layout);
        fahrenheitLabel = new JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Celsius Converter");
        this.setPreferredSize(new java.awt.Dimension(293, 404));

        celsiusLabel.setText("Headline:");
        {
        	subHeadline = new JLabel();
        	subHeadline.setText("Subheadline:");
        }
        {
        	subHeadTextField = new JTextField();
        }
        {
        	textBlockTextArea = new JTextArea();
        }
        {
        	textBox = new JLabel();
        	textBox.setText("Text:");
        }
        {
        	date = new JLabel();
        	date.setText("Date:");
        }
        {
        	place = new JLabel();
        	place.setText("Place:");
        }
        {
        	image = new JLabel();
        	image.setText("Image:");
        }
        {
        	dateTextField = new JTextField();
        	dateTextField.setText("dd.mm.yyyy");
        }
        {
        	PlaceTextField = new JTextField();
        }
        {
        	imagePath = new JTextField();
        	imagePath.setText("Image Path");
        }
        {
        	generateButton = new JButton();
        	generateButton.setText("Generate Picture");
        	generateButton.addActionListener(new ActionListener() {
        		public void actionPerformed(ActionEvent evt) {
        			generateButtonActionPerformed(evt);
        		}
        	});
        }

        fahrenheitLabel.setText("Thomas Ritter");
        layout.setVerticalGroup(layout.createSequentialGroup()
        	.addContainerGap()
        	.addComponent(fahrenheitLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	.addGap(28)
        	.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(tempTextField, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(celsiusLabel, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
        	.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(subHeadTextField, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(subHeadline, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
        	.addGroup(layout.createParallelGroup()
        	    .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	        .addComponent(textBox, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	        .addGap(56))
        	    .addComponent(textBlockTextArea, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE))
        	.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
        	.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(dateTextField, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(date, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
        	.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(PlaceTextField, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(place, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
        	.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
        	    .addComponent(imagePath, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
        	    .addComponent(image, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
        	.addGap(26)
        	.addComponent(generateButton, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	.addContainerGap(62, Short.MAX_VALUE));
        layout.setHorizontalGroup(layout.createSequentialGroup()
        	.addContainerGap()
        	.addGroup(layout.createParallelGroup()
        	    .addGroup(layout.createSequentialGroup()
        	        .addGroup(layout.createParallelGroup()
        	            .addComponent(subHeadline, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE)
        	            .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	                .addComponent(image, GroupLayout.PREFERRED_SIZE, 43, GroupLayout.PREFERRED_SIZE)
        	                .addGap(54))
        	            .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	                .addComponent(place, GroupLayout.PREFERRED_SIZE, 43, GroupLayout.PREFERRED_SIZE)
        	                .addGap(54))
        	            .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	                .addComponent(date, GroupLayout.PREFERRED_SIZE, 43, GroupLayout.PREFERRED_SIZE)
        	                .addGap(54))
        	            .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	                .addComponent(textBox, GroupLayout.PREFERRED_SIZE, 47, GroupLayout.PREFERRED_SIZE)
        	                .addGap(50))
        	            .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	                .addComponent(celsiusLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	                .addGap(42)))
        	        .addGroup(layout.createParallelGroup()
        	            .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        	                .addComponent(fahrenheitLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
        	                .addGap(0, 91, Short.MAX_VALUE))
        	            .addGroup(layout.createSequentialGroup()
        	                .addPreferredGap(fahrenheitLabel, imagePath, LayoutStyle.ComponentPlacement.INDENT)
        	                .addGroup(layout.createParallelGroup()
        	                    .addComponent(imagePath, GroupLayout.Alignment.LEADING, 0, 160, Short.MAX_VALUE)
        	                    .addComponent(PlaceTextField, GroupLayout.Alignment.LEADING, 0, 160, Short.MAX_VALUE)
        	                    .addComponent(dateTextField, GroupLayout.Alignment.LEADING, 0, 160, Short.MAX_VALUE)
        	                    .addComponent(textBlockTextArea, GroupLayout.Alignment.LEADING, 0, 160, Short.MAX_VALUE)
        	                    .addComponent(subHeadTextField, GroupLayout.Alignment.LEADING, 0, 160, Short.MAX_VALUE)
        	                    .addComponent(tempTextField, GroupLayout.Alignment.LEADING, 0, 160, Short.MAX_VALUE)))))
        	    .addComponent(generateButton, GroupLayout.Alignment.LEADING, 0, 269, Short.MAX_VALUE))
        	.addContainerGap());

        pack();
        this.setSize(293, 404);
    }// </editor-fold>//GEN-END:initComponents

    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GUIMachine().setVisible(true);
            }
        });
    }
    
    private void generateButtonActionPerformed(ActionEvent evt) {
    	new Analyser(tempTextField.getText(), subHeadTextField.getText(), textBlockTextArea.getText(), dateTextField.getText(), PlaceTextField.getText(), imagePath.getText());
    }

}
